from zope.schema.vocabulary import SimpleTerm, SimpleVocabulary
from zope.app.schema.vocabulary import IVocabularyFactory
from zope.interface import implements
from my315ok.portlet.rollitems import RollPortletMessageFactory as _a

roll_dire_unit=[
('top','up direction',_a(u'roll up')),
('down','down direction',_a(u'roll down')),
('left','left direction',_a('roll left')),
('right','right direction',_a('roll right')),
  ]
roll_dire_terms = [
    SimpleTerm(value, token, title) for value, token, title in roll_dire_unit
]


class RollDirectionVocabulary(object):
  """ Ad Unit sizes """

  implements(IVocabularyFactory)

  def __call__(self, context):
      return SimpleVocabulary(roll_dire_terms)


RollDirectionVocabularyFactory = RollDirectionVocabulary()
